package com.example.springdemo7.Controller;

import com.example.springdemo7.ServiceDemo.SayHiService;
import com.example.springdemo7.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class SayHiController {
    @Resource(name = "user2")
    private User user;
    public void sayHi() {
        System.out.println(user);
    }
}
